package com.czk.model.combile;
// 组合、连接
public abstract class OrganizationCompnent {
    private String name;
    private String des;
    // 捕捉成抽象的原因：叶子子节点不需要实现
    protected void add(OrganizationCompnent organizationCompnent){
        // 默认实现
        throw new UnsupportedOperationException();
    };
    protected void remove(OrganizationCompnent organizationCompnent){
        throw new UnsupportedOperationException();
    }

    public OrganizationCompnent(String name, String des) {
        this.name = name;
        this.des = des;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }
    // 方法print,每个节点都要实现
    protected abstract void print();
}
